<include file="public:header"/>
<div class="banner1"></div>
<!-- 会员登陆 -->
<div class="n_zhuce">
    <div class="n_zhuce_l">会员登陆</div>
    <div class="n_zhuce_r"></div>
    <div class="clear"></div>
</div>
<div class="login">
    <form>
        <table border="0" cellspacing="0" cellpadding="0" class="login1">
            <tr>
                <td>&nbsp;&nbsp;账 户：<input type="text" name="mobile" placeholder="请输入手机号码" id="mobile" class="clogin"/></td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;密 码：<input type="password" name="password" placeholder="请输入密码" id="password" class="clogin"/></td>
            </tr>
            <tr>
                <td style="padding-left:80px;"><input type="button"  id="login-btn" value="登 陆" class="anniu1"/>&nbsp;&nbsp;<a href="{:U('passport/forgot')}">忘记密码</a></td>
            </tr>
        </table>
    </form>
</div>
<!-- 底部 -->
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script>
$(function(){
    $('#login-btn').click(function(){
        var mobile = $.trim($('#mobile').val())
        if(!verify('#mobile', '请输入手机号码')) return false;
        if(!paramsformat(mobile, 'mobile'))
        {
            layer.tips('手机号码格式不正确', '#mobile', {tips:[2, '#3595CC']});
            $('#mobile').focus();
            return false;
        }
        var password = $.trim($('#password').val())
        if(!verify('#password', '请输入密码')) return false;
        var url = "{:U('passport/login')}"
        $.post(url, {username:mobile, password: password}, function(res){
                if(res.status == 2){window.location.href= '/'; return false}
            if(!res.status){
                layer.msg(res.msg); return false
            } else {
                layer.msg(res.msg,{icon: 1,time:2000}, function(){
                    window.location.href="{:U('member/center')}"
                })

            }
        },'json')

    })

})

</script>

<include file="public:footer"/>